import unittest
from General.Mapper import *


class TopicMapperTest(unittest.TestCase):
    topicMapper = TopicMapper()

    def otest_addAndGetTopic(self):
        id = self.topicMapper.addTopic("name", "dec", 15)
        print(self.topicMapper.getTopicByKey(id))

    def otest_isTopic(self):
        print(self.topicMapper.isTopic("社会"))

    def otest_getTopicbyName(self):
        print(self.topicMapper.getTopicByName("社会"))

    def otest_allTopic(self):
        topics = self.topicMapper.allTopic()
        print(topics)
